package com.pronosticnews.server.domain.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class Club implements fr.ysa.persistence.Entity {

	private static final long serialVersionUID = 3265366309895814367L;

	public static enum VALUE_NAME {
		id, nom, abreviation, adresse, budget, palmares, pays, siteInternet, sport, stade, logo
	}

	// primary key
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private java.lang.Integer id;

	@Column(name = "nom", length = 45, nullable = false)
	private java.lang.String nom;

	@Column(name = "abreviation", length = 3, nullable = false)
	private java.lang.String abreviation;

	// many to one
	@ManyToOne(fetch = FetchType.EAGER)
	private Pays pays;

	@Column(name = "site_internet", length = 100, nullable = true)
	private java.lang.String siteInternet;

	@Column(name = "budget", length = 50, nullable = true)
	private java.lang.String budget;

	@Column(name = "adresse", length = 100, nullable = true)
	private java.lang.String adresse;

	@ManyToOne(fetch = FetchType.EAGER)
	private Stade stade;

	@Column(name = "palmares", length = 45, nullable = false)
	private java.lang.String palmares;

	@ManyToOne(fetch = FetchType.EAGER)
	private Sport sport;

	
	private Integer logo;
	
	public java.lang.Integer getId() {
		return id;
	}

	public void setId(java.lang.Integer id) {
		this.id = id;
	}

	public java.lang.String getNom() {
		return nom;
	}

	public void setNom(java.lang.String nom) {
		this.nom = nom;
	}

	public Pays getPays() {
		return this.pays;
	}

	public void setPays(Pays pays) {
		this.pays = pays;
	}

	public java.lang.String getSiteInternet() {
		return siteInternet;
	}

	public void setSiteInternet(java.lang.String siteInternet) {
		this.siteInternet = siteInternet;
	}

	public java.lang.String getBudget() {
		return budget;
	}

	public void setBudget(java.lang.String budget) {
		this.budget = budget;
	}

	public java.lang.String getAdresse() {
		return adresse;
	}

	public void setAdresse(java.lang.String adresse) {
		this.adresse = adresse;
	}

	public Stade getStade() {
		return stade;
	}

	public void setStade(Stade stade) {
		this.stade = stade;
	}

	public java.lang.String getPalmares() {
		return palmares;
	}

	public void setPalmares(java.lang.String palmares) {
		this.palmares = palmares;
	}

	public Sport getSport() {
		return sport;
	}

	public void setSport(Sport sport) {
		this.sport = sport;
	}

	public java.lang.String getAbreviation() {
		return abreviation;
	}

	public void setAbreviation(java.lang.String abreviation) {
		this.abreviation = abreviation;
	}

	@Override
	public List<String> getColumnNameValues() {
		List<String> list = new ArrayList<String>();
		for (VALUE_NAME value : VALUE_NAME.values()) {
			list.add(value.name());
		}
		return list;
	}

	public Integer getLogo() {
		return logo;
	}

	public void setLogo(Integer logo) {
		this.logo = logo;
	}

}